<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style th:fragment="styletwo">
        nav{
            z-index: 1;
            width: 100%;
            height: 4em;
            text-align: center;
            color: #ffffff;
            font-family: "黑体";
            font-size: 1em;
            font-weight: bold;
            background: rgb(51,51,51);
        }
        .logo{
            position: relative;
            top: 1em;
            width: 20%;
            height: 100%;
            float: left;

        }
        .menu{
            position: relative;
            top: 1em;
            width: 60%;
            height: 100%;
            float: left;
        }
        .login{
            position: relative;
            top: 1em;
            width: 20%;
            height: 100%;
            float: left;
        }
        nav a{
            color: #ffffff;
        }
    </style>
</head>
<body>
<nav th:fragment="nav" style="background-color:#000000">
    <div class="logo">
        <a th:href="@{../}"><span>logo</span></a>
        <span>搜索</span>
    </div>
    <div class="menu">
        <a th:href="@{../home}"><span>首页</span></a>
        <a th:href="@{${goods}}"><span>个人作品</span></a>
        <a th:href="@{../user}"><span>其他作者</span></a>
        <a th:href="@{${works}}"><span>作品管理</span></a>
        <a th:href="@{../select}"><span>图片市场</span></a>
        <span>商城</span>
        <a th:href="@{../Page}"><span>上传</span></a>
    </div>
    <div class="login">
        <p sec:authorize="isAuthenticated()">
            <a th:href="@{/logout}">注销<span sec:authentication="principal.username"/></a>
        </p>
    </div>
</nav>
</body>
</html>